home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / RCOLORG2.DMO < prev    next >
Text File  |  1996-07-04  |  3KB  |  52 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   RCOLORG2.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20. $INCLUDE "DAS-NBV1.INC"
  21.  
  22. SCREEN 12
  23. CLS
  24. GraphicSETUP
  25. COLOR 7, 0
  26. ? "┌─────────────────────────────────────────────────────────────────────────
  27. ? "│ GBoxCOLOR2 ( C1%, R1%, C2%, R2%, OldColor?, NewColor? )
  28. ? "│
  29. ? "│ PURPOSE: exchange all occurances of Oc? with Nc? in the box
  30. ? "│  PARAMS: C1% left-most column ( 0 -> 639 )
  31. ? "│          R1% top most row     ( 0 -> 479 )
  32. ? "│          C2% right most column
  33. ? "│          R2% bottom most row
  34. ? "│          Oc? the color to be changed
  35. ? "│          Nc? the color to replace Oc?
  36. ? "└─────────────────────────────────────────────────────────────────────────
  37.  
  38. DELAY 1                                         '┌───────────────────────────
  39.                                                 '│
  40. GBoxColor 270, 250, 369, 350, 15                '│ draw a big white box
  41. GBoxColor 295, 275, 343, 325,  0                '│ put a black one inside it
  42.                                                 '│
  43. FOR C? = 1 TO 14                                '│ change only the old color
  44.   GBoxColor2 270, 250, 369, 350, C?-1, C?       '│ to the new color
  45.   DELAY .6                                      '│
  46.   IF INSTAT THEN EXIT FOR                       '│ bail out any key
  47. NEXT                                            '│
  48.                                                 '│
  49. WHILE NOT INSTAT : WEND                         '│
  50. CLS                                             '│
  51. SCREEN 0                                        '└──────────────────────────
  52.